home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / gen_vid / scrn_jb.com / CLS2.ASM < prev    next >
Encoding:
Assembly Source File  |  1988-08-22  |  841 b   |  58 lines

  1. ;
  2. ;this program clears the monochrome screen
  3. ;
  4. ;           written by
  5. ;      John O. Battle, N4OE
  6. ;         c/s 73547,3346
  7. ;    732A Holcomb Bridge Road
  8. ;       Norcross, GA 30071
  9. ;         (404) 449-8536
  10. ;
  11. page      62,132       
  12.   
  13. cseg    segment    para public 'code'  
  14.     assume    cs:cseg,ds:cseg,es:cseg,ss:cseg  
  15.     org    100h  
  16.   
  17. begin:      
  18.  
  19. cls2    proc    near 
  20.     assume    cs:cseg,ds:cseg
  21.     mov    bx,cs
  22.     mov    ds,bx
  23.     call    d2_cls
  24.     int    20h
  25. cls2    endp
  26.  
  27. d2_cls    proc    near
  28. ;
  29. ;This subroutine clears the monochrome screen.
  30. ;
  31.     push    ds        
  32.     push    bx
  33.     push    cx
  34.     push    dx
  35.     push    di
  36.     mov    bx,0b000h    ;monochrome display memory segment
  37.     mov    ds,bx
  38.     mov    dh,7
  39.     mov    dl,' '
  40.     mov    cx,2000
  41.     mov    di,0
  42. cl_1:    
  43.     mov    ds:[di],dx 
  44.     inc    di
  45.     inc    di
  46.     loop    cl_1
  47.     pop    di
  48.     pop    dx
  49.     pop    cx
  50.     pop    bx
  51.     pop    ds
  52.     ret
  53.  
  54. d2_cls    endp
  55.  
  56. cseg    ends 
  57.     end    begin 
  58.